You are here: Symbol Reference > Dew Namespace > Dew.Stats Namespace > Dew.Stats.Units Namespace > Classes > Statistics Class > Statistics Methods > GeometricFit Method > Statistics.GeometricFit Method ([In] TVec, out double, double[], double)
Dew Stats for .NET
ContentsIndexHome
Example

The following example generates 1000 random Geometric distributed values and then uses GeometricFit routine to extract used P parameter

using Dew.Math; using Dew.Stats; using Dew.Stats.Units; namespace Dew.Examples; { private void Example() { Vector vec1 = new Vector(1000, false); // first, generate 1000 randomly geometr. distributed // numbers with parameter p=0.713 StatRandom.RandomGeometric(0.713, vec1, -1); // Now, extract the p and its 100*(1-0.05) = 95% // confidence interval double resp; double[] CIp = new double[2]; Statistics.GeometricFit(vec1, out resp, out CIp, 0.05); } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.